import axios from '@/api/fetch';
//import * as types from './types';
import SERVER from '@/api/server';

//特殊车辆配件类型保修期查询--经销商
//特殊车辆配件类型保修期查询-主页面查询
export const getListByPage = params => axios.post(`${SERVER.CLAIMFAC}/vehicleQuality/getListByPage`,  params );
//通过ID查
export const getDetail = params => axios.get(`${SERVER.CLAIMFAC}/vehicleQuality/selectById/${params.id}`);
//新增的保存
export const editOne = params => axios.post(`${SERVER.CLAIMFAC}/vehicleQuality/updateByPtId`,  params );
//批量启动
export const piliangqiyong = data => axios.post(`${SERVER.CLAIMFAC}/rPSpecialPt/updateEnableByIds`,  null ,{params : data} );
//批量停用
export const piliangtingyong = data => axios.post(`${SERVER.CLAIMFAC}/rPSpecialPt/updateEnableByIds`,  null ,{params : data} );
//导出
export const getListForExport = (params) => axios.post(`${SERVER.CLAIMFAC}/rPSpecialPt/getListForExport`, params, {
  responseType: 'blob'
});
  //下载中心导出
  export const exporturl = params => axios.post(`/api/cmscloud.excel/downloadExcel/exportExcel/${params.CODE}`, params);

//一般车辆配件类型保修期编辑弹窗的保存
export const exportList = params => axios.post(`${SERVER.CLAIMFAC}/vehicleQuality/getListForExport`,  params );

